Add mapbox-performance-patterns skill#60
Closed
mattpodwysocki wants to merge 1 commit into
Closed
Conversation
Introduces a new Agent Skill that provides performance optimization guidance for Mapbox applications, similar to Vercel's react-best-practices but focused on map-specific performance patterns. Key areas covered: - 🔴 Critical: Eliminate initialization waterfalls - 🔴 Critical: Optimize initial bundle size - 🟡 High Impact: Optimize marker count and rendering - 🟡 High Impact: Data loading strategies (GeoJSON vs vector tiles) - 🟡 High Impact: Event handling optimization - 🟢 Optimization: Memory management and cleanup - 🟢 Optimization: Mobile-specific optimizations - 🟢 Optimization: Layer consolidation and styling Patterns are prioritized by impact on user experience: - Critical issues directly cause slow initial load or visible jank - High impact issues create noticeable delays - Optimizations provide incremental improvements Each pattern includes: - Anti-pattern examples (what NOT to do) - Solution examples with code - Performance impact measurements - Decision matrices and thresholds Based on performance principles from Vercel's react-best-practices and Mapbox-specific optimization patterns from production applications. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces a new Agent Skill that provides performance optimization guidance for Mapbox applications, inspired by Vercel's react-best-practices but focused on map-specific performance patterns.
Just like Vercel's guide helps LLMs make informed decisions about React performance, this skill teaches AI assistants how to build fast, efficient Mapbox applications by providing concrete, actionable patterns prioritized by impact.
Motivation
AI assistants need structured, authoritative guidance on Mapbox performance to:
Similar to how react-best-practices reduces hallucination by providing canonical patterns, this skill ensures LLMs recommend proven Mapbox performance techniques.
What's Included
🔴 Critical (Fix First)
Patterns that directly cause slow initial load or visible jank:
🟡 High Impact
Patterns that create noticeable delays or resource usage:
🟢 Optimization
Patterns for incremental improvements:
Structure
Each pattern includes:
Examples
Eliminate Waterfalls
Marker Performance
GeoJSON vs Vector Tiles
Performance Checklist
The skill includes a prioritized checklist:
🔴 Critical (Do First)
🟡 High Impact
🟢 Optimization
Comparison to Vercel's react-best-practices
Value for LLMs
Like Vercel's react-best-practices, this skill:
Testing
To test this skill:
Symlink to Claude Code:
Test prompts:
Expected: Claude cites specific patterns from the skill with priority levels and code examples.
Documentation
Updated
skills/README.mdto include:Related
mapbox-integration-patterns(setup),mapbox-style-patterns(styling)mapbox-style-quality(validation/checks) - this focuses on runtime performance🤖 Generated with Claude Code